//goole 验证器

// import { postRequest, getRequest } from "@/utils/request";
import { getRequest1, postRequest1 } from "@/utils/request1";

// 获取谷歌验证器密钥googleAuthSecretApi
export const googleAuthSecretApi = (param) => {
  return getRequest1("/api/v2/cms/account/google_auth_secret", param);
};
// 绑定谷歌验证器bindGoogleAuthApi

export const bindGoogleAuthApi = (param) => {
  return postRequest1("/api/v2/cms/account/bind_google_auth", param);
};
// 校验google验证器checkGoogleAuthApi

export const checkGoogleAuthApi = (param) => {
  return postRequest1("/api/v2/cms/account/check_google_auth", param);
};
// 打开google验证器选项openGoogleAuthApi
export const openGoogleAuthApi = (param) => {
  return postRequest1("/api/v2/cms/account/open_google_auth", param);
};

// ============================== 加密接口 =========================
// 获取谷歌验证器密钥googleAuthSecretApi
export const googleAuthSecretNewApi = (param) => {
  return getRequest1("/api/v2/user/google_auth_secret", param);
};

export const bindGoogleAuthNewApi = (param) => {
  return postRequest1("/api/v2/user/bind_google_auth", param);
};

// 校验google验证器checkGoogleAuthApi

export const checkGoogleAuthNewApi = (param) => {
  return postRequest1("/api/v2/user/check_google_auth", param);
};

// 打开google验证器选项openGoogleAuthApi
export const openGoogleAuthNewApi = (param) => {
  return postRequest1("/api/v2/user/open_google_auth", param);
};
